<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class AddNodeRequest extends FormRequest
{
    //验证 false不允许访问
    public function authorize()
    {
        return true;
    }
    //验证规则
    public function rules()
    {
        return [
            'name'=>'required|min:2'
        ];
    }
    //验证提示信息
    public function messages()
    {
        return [
            'name.required'=>'权限名称不能为空'
        ];
    }
}
